package com.jacklin.order.controller;

import com.jacklin.order.service.OrderService;
import org.jacklin.common.api.vo.Result;
import org.jacklin.common.dto.OrderDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @describe: OrderController
 * @author: jacklin
 * @date: 2022-03-28 22:27
 */
@RestController
@RequestMapping(value = "/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    /**
     * 创建订单
     *
     * @author: jacklin
     * @date: 2022/8/4 9:22
     **/
    @PostMapping(value = "/createOrder")
    public Result<?> createOrder(@RequestBody OrderDTO orderDTO) {
        return orderService.createOrder(orderDTO);

    }
}
